/*
 * InternalRegisterSerializer.h
 *
 *  Created on: Nov 2, 2012
 *      Author: m
 */

#ifndef INTERNALREGISTERSERIALIZER_H_
#define INTERNALREGISTERSERIALIZER_H_

#include <cstring>
#include "../../../physical_layer/physical_layer.h"
#include "BPlusTreeDefinitions.h"

class InternalRegisterSerializer : public physical::VariableSizeRecordSerializer< BPlusSimpleRegisterTemplate < std::string, NodeID_t > >
//class InternalRegisterSerializer: public physical::VariableSizeRecordSerializer< InternalRegister_t >
{
private:
    physical::VariableStringSerializer m_keySerializer;

public:
    InternalRegisterSerializer();
    virtual ~InternalRegisterSerializer();

    size_t serialize( const _T &element, physical::byteStream block );
    size_t deserialize( const physical::byteStream block, _T &element );
    size_t computeSize( const _T &element );
    size_t serialize( const _T_ptr &elementPtr, physical::byteStream block );
    size_t deserialize( const physical::byteStream block, _T_ptr &elementPtr );
    size_t computeSize( const _T_ptr &elementPtr );
};

#endif /* INTERNALREGISTERSERIALIZER_H_ */
